<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018\10\11 0011
 * Time: 14:48
 */

namespace app\Lib\Ioc\AdminAuth;


use app\Lib\Model\AdminAuth\GetAuthorization\GetUserAuthMenu;
use app\Lib\Model\AdminAuth\GetTopMenu;
use app\Lib\Model\User\User;

class AuthMenu
{
    /**
     * 获取菜单
     * @param $data
     * @return array
     */
    public function getMenu($data){

        $result = (new GetUserAuthMenu(new User($data['userId'])))->run();
        return $result;
    }

    /**
     * 获取菜单更新时间
     */
    public function getMenuTime(){

    }

    /**
     * 权限判断
     */
    public function isAuth(){

    }


    public function getTopMenu(){
        $model =  (new GetTopMenu());
        return  $model->run();
    }
}